{%extends "base.html"%}
{%block title%}朋友{%endblock%}
{%block sideleft%}{%include "sideleft.html"%}{%endblock%}
{%block content%}
<!--登录成功以后的内容-->

<div class="accounts">
	<h1>{{request.session.userinfo.username}}的帐号</h1>
	<div id='self_nav'>
		<ul>
			<li><a href="/accounts/">个人信息</a></li>
			<li><a href="/accounts/changepassword/">修改密码</a></li>
			<li class='current'><a href="/accounts/friends/">朋友们</a></li>
		</ul>
	</div>
	<div class="clearer"></div>
	<div id='self_friends'>
		<ul>
			{%for friend in pages.object_list%}
				<li>
					<a href="/activitys/people/{{friend.friend_name}}"><image src="{{friend.friend_image}}"/></a>
					<div class='self_friend_info'>
						<a href="/activitys/people/{{friend.friend_name}}">{{friend.friend_name}}</a>
						<span><a href='javascript:delfriend("{{friend.friend_name}}","{{friend.friend_image}}")'>删除好友</a></span>
						
					</div>
				</li>
					
			{%endfor%}
		</ul>	
		<div class="fenye">
			{%if pages.has_other_pages%}
				{%if pages.has_previous%}
					<a href="?page={{pages.previous_page_number}}">上一页</a>
				{%endif%}
				{%for p in page_range%}
					{%ifequal p pages.number%}
						<span>{{p}}</span>
					{%else%}
						<a href="?page={{p}}">{{p}}</a>
					{%endifequal%}
				{%endfor%}
				{%if pages.has_next%}
					<a href="?page={{pages.next_page_number}}">下一页</a>
				{%endif%}
			{%endif%}
		</div>
	</div>
	<div class="clearer"></div>
</div>

{%endblock%}
{%block sideright%}{%include "sideright.html"%}{%endblock%}